<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
	<head>
		<!-- Bootstrap -->
<!--		<link href="../../bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet">-->
<!--		<link th:href="@{/bootstrap/css/bootstrap.min.css}" rel="stylesheet">-->
		<div th:include="pages/include :: public_css"></div>
		<title>登录</title>
		<style type="text/css">
			html,
			body,
			.container {
				height: 100%;
			}

			form {
				width: 400px;
				position: relative;
				top: 50%;
				left: 50%;
				transform: translate(-50%, -70%);
			}
		</style>
	</head>
	<body>
		<div class="container">
			<form th:action="@{/admin/login}" method="post" class="text-center">
				<span id="hint" style="display: none;color: red;"></span>
				<h1>欢迎使用XXX系统</h1>
				<div class="form-group">
					<input type="text" class="form-control" value="leo" name="account" id="ipt_account" placeholder="账号">
				</div>
				<div class="form-group">
					<input type="password" class="form-control" value="123" name="password" id="ipt_password" placeholder="密码">
				</div>
				<div class="radio">
					<label>
						<input type="radio" name="type" value="0" checked> 系统管理员
					</label>
					<label>
						<input type="radio" name="type" value="1"> 宿舍管理员
					</label>
					<label>
						<input type="radio" name="type" value="2"> 学生
					</label>
				</div>
				<div class="checkbox">
					<label>
						<input type="checkbox" name="rem" value="1" id="cb_rem"> 记住密码
					</label>
				</div>

				<div>
					<button style="width: 49%;" class="btn btn-primary" type="submit">登录</button>
					<button id="btn_forget" type="reset" style="width: 49%;" class="btn btn-default">重置</button>
				</div>
			</form>
		</div>
		<div th:include="pages/include :: public_js"></div>
		<script type="text/javascript">
			$(document).ready(function () {
				console.log("jquery 加载成功");
				let msg = "[[${msg}]]";//${msg}直接从request域中获取数据
				console.log(msg);
				if (msg.trim().length !== 0) {
					$("#hint").text(msg).show();
				}
			});
		</script>
	</body>
</html>
